﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RequisitionForm.aspx.cs" Inherits="frmViewItemCatalog.RequisitionForm" 
MasterPageFile ="~/MasterPageForEmployee.Master"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="height: 729px; width: 697px">
        <tr>
            <td colspan="2" align="center" style="font-style: normal">
                <span class="style2">Requisition Form</span><strong> </strong>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right" style="font-style: normal">
                Date:<asp:Label ID="lblDate" runat="server" ></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style5">
                Requisition ID:
            </td>
            <td>
                <asp:Label ID="lblRequisitionID" runat="server" Text="DDS/111/99"></asp:Label>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Department Name:
            </td>
            <td class="style1">
                <asp:Label ID="lblDepartmentName" runat="server" Text="Science Department" Style="font-size: larger"></asp:Label>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Employee ID:
            </td>
            <td>
                <asp:Label ID="lblEmployeeID" runat="server" Text="11233"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style5">
                Employee Name:
            </td>
            <td class="style1">
                <asp:Label ID="lblEmployeeName" runat="server" Text="Jenny Wong" Style="font-size: larger"></asp:Label>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Employee Email Address:
            </td>
            <td class="style1">
                <asp:Label ID="lblEmail" runat="server" Text="Jenny@LogicUniversity" Style="font-size: larger"></asp:Label>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Collection Point:
            </td>
            <td class="style1">
                <asp:Label ID="lblCollectionPoint" runat="server" Text="Science Department" Style="font-size: larger"></asp:Label>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Item Category:
            </td>
            <td class="style1">
                <asp:DropDownList ID="cboCategoryName" runat="server" Height="23px" Width="150px"
                    AutoPostBack="True" 
                    onselectedindexchanged="cboCategoryName_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style1">
                Item Name:
            </td>
            <td class="style1">
                <asp:DropDownList ID="cboItemName" runat="server" Height="23px" Width="150px"
                    AutoPostBack="True">                    
                </asp:DropDownList>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style5">
                Order Quantity:
            </td>
            <td class="style1">
                <asp:TextBox ID="txtOrderQuantity" runat="server" Text="150" Height="23px" Width="143px">150</asp:TextBox>
                <br />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right" class="style6">
                <asp:Button ID="btnAddOrder" runat="server" Text="AddOrder" OnClick="btnAddOrder_Click"
                    Style="height: 26px" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:GridView ID="GridViewOrderList" runat="server" CellPadding="4" ForeColor="#333333"
                    GridLines="None" AutoGenerateColumns="false" ShowFooter="True" 
                    onrowcommand="GridViewOrderList_RowCommand" 
                    onrowdatabound="GridViewOrderList_RowDataBound">
                    <AlternatingRowStyle BackColor="White" BorderStyle="Double" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    <%--<AlternatingRowStyle BackColor="White" />--%>
                    <Columns>
                        <asp:TemplateField HeaderText="Item No" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblItemNumber" runat="server" Text='<%# Eval("ItemID") %>' Style="text-align: center" />
                                 <asp:LinkButton ID="btnRemove" runat="server" Text="Remove" Font-Size="13px" Font-Names="sans-serif"
                                CommandName="Remove" OnRowDataBound="GridViewOrderList_RowDataBound" CommandArgument='<%# Container.DataItemIndex%>' Style="font-size: 12px;
                                color:#507CD1; text-decoration: none"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Category Name" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblCategoryName" runat="server" Text='<%# Eval("categoryName") %>'
                                    Style="text-align: center" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Item Name" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblItemName" runat="server" Text='<%# Eval("itemName") %>'
                                    Style="text-align: center" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Price" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblItemPrice" runat="server" Text='<%#"$" + Eval("itemPrice") %>' Style="text-align: center" />
                                
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="OrderQuantity" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%--<asp:Label ID="lblOrderQuantity" runat="server" Text='<%# Eval("orderQuantity") %>' Style="text-align: center" />--%>
                                <asp:TextBox ID="txtOrderQuantity" runat="server" Text='<%# Eval("orderQuantity") %>' Style="text-align: center" ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%-- <asp:TemplateField HeaderText="Quantity" HeaderStyle-HorizontalAlign="Center">
                <ItemTemplate>
                        <asp:LinkButton ID="btnMinus" runat ="server" Style="text-decoration:none;" CommandName="Decrease" CommandArgument='<%# Container.DataItemIndex%>' Text="-" ></asp:LinkButton>
                        <asp:Label ID="lblQty" runat ="server" Text ='<%# Eval("Qty") %>' style="text-align:center" />
                        <asp:HiddenField ID="Stock" runat="server" Value='<%# Eval("Stock")%>' />
                        <asp:LinkButton ID="btnPlus" runat ="server" Style="text-decoration:none;" CommandName="Increase" CommandArgument='<%# Container.DataItemIndex%>' Text="+"></asp:LinkButton>
                        <br />
                        <asp:Label ID="checkstock" runat="server" HorizontalAlign="Right" Text="No More Stock Left" Visible="False"></asp:Label>      
                </ItemTemplate>
            </asp:TemplateField>--%>
                        <asp:TemplateField HeaderText="Total" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right">
                            <ItemTemplate>
                                <asp:Label ID="lblTotal" runat="server" />
                            </ItemTemplate>
                            <FooterTemplate>
                                
                                <asp:Label ID="lblGrandTotal" runat="server" /><br />
                            </FooterTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left">
                &nbsp;<asp:Label ID="lblRemark" runat="server" Text="Remark"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="left" class="style5">
                <asp:TextBox ID="txtRemak" runat="server" Text="Event...." TextMode="MultiLine"></asp:TextBox>
            </td>
            <td align="right" class="style5">
                <asp:Button ID="btnSendForApproval" runat="server" Text="Send for Approval" OnClick="btnSendForApproval_Click" />
            </td>
            <td align="right">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
